// Test APIs
// Test function: Test + [SUBJECT] + [ACTION OR FUNCTION]

package compile

import (
	"sail/classpath"
)

func TestImportCleanUpImports(importDeclares []*ImportDeclare) []*ImportDeclare {
	return cleanUpImports(importDeclares)
}

func TestImportMakePackageEntryByPartName(importDeclares []*ImportDeclare,
	targetPartName string, targetIndex int) *PackageEntry {

	return makeSingleNormalPackageEntry(importDeclares, targetPartName, targetIndex)
}

func TestImportMakeWildcardPackageEntries(importDeclares []*ImportDeclare,
	cp *classpath.ClassPath) []*PackageEntry {

	return makeWildcardPackageEntries(importDeclares, &Option{
		Classpath:     cp,
		ErrorReporter: DefaultErrorReporter,
	})
}

func TestImportMakePackageEntries(importDeclares []*ImportDeclare, cp *classpath.ClassPath) (
	[]*PackageEntry, []*PackageEntry, []*PackageEntry) {

	return makePackageEntries(importDeclares, &Option{
		Classpath:     cp,
		ErrorReporter: DefaultErrorReporter,
	})
}

func TestCleanUpImports(importDeclares []*ImportDeclare) []*ImportDeclare {
	return cleanUpImports(importDeclares)
}

func TestScopeImport(impDecls []*ImportDeclare, scope *Scope,
	classPath *classpath.ClassPath) {

	ScopeImports(impDecls, scope, &Option{
		Classpath:     classPath,
		ErrorReporter: DefaultErrorReporter,
	})
}
